package com.chuyangc.controller;

import com.chuyangc.entity.Dict;
import com.chuyangc.service.DictService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author 欧楚杨
 */
@RestController
@RequestMapping("dict")
public class DictController {
    private final DictService dictService;

    DictController(DictService dictService){
        this.dictService = dictService;
    }

    @GetMapping("selectAll")
    public List<Dict> selectAll(){
        return dictService.list();
    }
}
